// 确认框封装

import { Modal } from 'antd'
import { ExclamationCircleOutlined } from '@ant-design/icons';

const confirmDialog = (title: string, okEvent: Function) => {
    const { confirm } = Modal;
    confirm({
        title: title,
        icon: <ExclamationCircleOutlined />,
        okText: '确认',
        cancelText: '取消',
        onOk() {
            okEvent()
        },
        onCancel() {
            console.log('Cancel');
        },
    });
}

export default confirmDialog